A conventional method of testing a memory involves the operations of programming the memory and erasing the memory by exposing the memory to ultraviolet light (UV). The UV erase operation takes a significant amount of time, lowers productivity, and increases manufacturing costs. It is therefore desirable to provide a method for testing a memory that minimizes the number of the UV erase operations.